#include<stdio.h>
#include<stdlib.h>
#define Max 20
typedef struct node
{
	char data;
	struct node* lchild;
	struct node* rchild;
}BTnode;

typedef struct
{
	BTnode* b;
	int flag;
}BTnode2;

typedef struct
{
	BTnode* data[Max];
	int top;
}stack;

void initstack(stack* &s)
{
	s = (stack*)malloc(sizeof(stack));
	s->top = -1;
}
void push(stack*& s,BTnode* &e)
{
	s->top++;
	s->data[s->top] = e;
}
void pop(stack* &s,BTnode* &e)
{
	e = s->data[s->top];
	s->top--;
}
void gettop(stack* s, BTnode* &e)
{
	e=s->data[s->top];
}
bool empty(stack* s)
{
	return(s->top == -1);
}
